package com.kvest.ula.activities;

import com.kvest.ula.R;
import com.kvest.ula.core.Settings;

import android.os.Bundle;
import android.view.Window;
import android.widget.TextView;

public class ULAClubItem extends ULABaseActivity
{
	public static final String PART_NUMBER = "part_number";
	
	public static final int CONTACTS_PART = 0;
	public static final int FOR_PARTNERS_PART = 1;
	public static final int FOR_PARTICIPANT_PART = 2;
	public static final int BECOME_PARTICIPANT_PART = 3;
	public static final int TERMS_PART = 4;


	
	@Override
    public void onCreate(Bundle savedInstanceState) 
    {
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		
        super.onCreate(savedInstanceState);
        setContentView(R.layout.ulaclub_item);
        
        if (Settings.getSettings().getInterfaceColor() == Settings.IC_BLACK)
        {
        	findViewById(R.id.ulaclub_item_main_layout).setBackgroundDrawable(getResources().getDrawable(R.drawable.black_bg));
        }
        
        setContent(getIntent().getIntExtra(PART_NUMBER, -1));
    }
	
	private void setContent(int partNumber)
	{
		TextView text = (TextView)findViewById(R.id.ulaclub_item_text);
		switch (partNumber) 
		{
			case CONTACTS_PART:
				setTitle(R.string.contacts);	
				text.setText(R.string.contacts_text);
				break;
			case FOR_PARTNERS_PART:
				setTitle(R.string.for_partners);	
				text.setText(R.string.for_partners_text);
				break;
			case FOR_PARTICIPANT_PART:
				setTitle(R.string.for_participant);		
				text.setText(R.string.for_participant_text);
				break;
			case BECOME_PARTICIPANT_PART:
				setTitle(R.string.become_participant);
				text.setText(R.string.become_participant_text);
				break;
			case TERMS_PART:
				setTitle(R.string.terms);	
				text.setText(R.string.terms_text);
				break;	
		}
		
		text.setTextSize(Settings.getSettings().getFullFontSize());
    	text.setTextColor(Settings.getSettings().getFontColor());
    	text.setBackgroundColor(Settings.getSettings().getFontBgColor());
	}
}
